package com.windupurnomo.util;

import android.database.sqlite.SQLiteDatabase;

public class DataGenerator {
	public static void genResourceData(SQLiteDatabase db){
		db.execSQL("INSERT INTO "+D.table.RESOURCE+" ("+D.field_resource.RESOURCE+") VALUES ('Water')");
		db.execSQL("INSERT INTO "+D.table.RESOURCE+" ("+D.field_resource.RESOURCE+") VALUES ('Food')");
		db.execSQL("INSERT INTO "+D.table.RESOURCE+" ("+D.field_resource.RESOURCE+") VALUES ('Paper')");
	}
	
	public static void genConditionData (SQLiteDatabase db){
		db.execSQL("INSERT INTO "+D.table.CONDITION+" ("+D.field_condition.CONDITION+") VALUES ('Power')");
		db.execSQL("INSERT INTO "+D.table.CONDITION+" ("+D.field_condition.CONDITION+") VALUES ('Social')");
		db.execSQL("INSERT INTO "+D.table.CONDITION+" ("+D.field_condition.CONDITION+") VALUES ('Finance')");
		db.execSQL("INSERT INTO "+D.table.CONDITION+" ("+D.field_condition.CONDITION+") VALUES ('EIQ')");
	}
	
	/*id, task, duration, place, water, food, paper, power, social, finance, eiq*/
	public static void genTaskData (SQLiteDatabase db){
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (1,'"+Util.TaskName.MAKAN+"',1,"+Util.TaskPlace.INDOOR+", -2, -1, 0, 3, 1, -500, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (2,'"+Util.TaskName.NYUCI+"',2,"+Util.TaskPlace.INDOOR+", -2, 0, 0, -2, 0, 0, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (3,'"+Util.TaskName.KULIAH+"',3,"+Util.TaskPlace.INDOOR+", -1, 0, -2, -3, 5, 0, 5)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (4,'"+Util.TaskName.KAJIAN+"',2,"+Util.TaskPlace.INDOOR+", -1, 0, -2, -2, 5, 0, 5)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (5,'"+Util.TaskName.OLAHRAGA+"',2,"+Util.TaskPlace.OUTDOOR+", -3, 0, 0, -3, 1, 0, 5)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (6,'"+Util.TaskName.MANDI+"',2,"+Util.TaskPlace.INDOOR+", -2, 0, 0, -2, 0, 0, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (7,'"+Util.TaskName.NGOBROL+"',2,"+Util.TaskPlace.OUTDOOR+", 0, 0, 0, -1, 5, 0, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (8,'"+Util.TaskName.TUGAS+"',2,"+Util.TaskPlace.INDOOR+", -1, -1, -2, -1, 1, 0, 5)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (9,'"+Util.TaskName.MENYIRAM+"',2,"+Util.TaskPlace.OUTDOOR+", -3, 0, 0, -2, 0, 0, 5)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (10,'"+Util.TaskName.PRAKTIKUM+"',4,"+Util.TaskPlace.INDOOR+", -1, 0, -2, -2, 5, 0, 5)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (11,'"+Util.TaskName.MENJEMUR+"',1,"+Util.TaskPlace.OUTDOOR+", 0, 0, 0, -1, 0, 0, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (12,'"+Util.TaskName.PIKET+"',2,"+Util.TaskPlace.INDOOR+", -2, 0, 0, -1, 2, 0, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (13,'"+Util.TaskName.MENYETRIKA+"',2,"+Util.TaskPlace.INDOOR+", 0, 0, 0, -2, 0, 0, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (14,'"+Util.TaskName.BELI_AIR+"',2,"+Util.TaskPlace.OUTDOOR+", 20, 0, 0, -2, 0, -500, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (15,'"+Util.TaskName.BELI_MAKANAN+"',2,"+Util.TaskPlace.OUTDOOR+", 0, 20, 0, -2, 0, -500, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (16,'"+Util.TaskName.BELI_KERTAS+"',2,"+Util.TaskPlace.OUTDOOR+", 0, 0,  20, -2, 0, -500, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (17,'"+Util.TaskName.KERJA+"',2,"+Util.TaskPlace.OUTDOOR+", 0, -2, -5, -4, 1, 10000, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (18,'"+Util.TaskName.NONTON+"',3,"+Util.TaskPlace.INDOOR+", -1, -2, 0, -2, 2, 500, 0)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (19,'"+Util.TaskName.RAPAT+"',2,"+Util.TaskPlace.INDOOR+", -1, 0, -2, -2, 2, 0, 5)");
		db.execSQL("INSERT INTO "+D.table.TASK+" VALUES (20,'"+Util.TaskName.ISTIRAHAT+"',2,"+Util.TaskPlace.INDOOR+", 0, 0, 0, 5, 0, 0, 0)");
	}
	
	public static void genDayData (SQLiteDatabase db){
		db.execSQL("INSERT INTO "+D.table.DAY+" VALUES (1, "+Util.DayWeather.RAIN+", 7, 8)");
		db.execSQL("INSERT INTO "+D.table.DAY+" VALUES (2, "+Util.DayWeather.RAIN+", 16, 18)");
		db.execSQL("INSERT INTO "+D.table.DAY+" VALUES (3, "+Util.DayWeather.RAIN+", 6, 8)");
		db.execSQL("INSERT INTO "+D.table.DAY+" VALUES (4, "+Util.DayWeather.RAIN+", 14, 17)");
		db.execSQL("INSERT INTO "+D.table.DAY+" VALUES (5, "+Util.DayWeather.SUNNY+", 0, 0)");
		db.execSQL("INSERT INTO "+D.table.DAY+" VALUES (6, "+Util.DayWeather.RAIN+", 17, 19)");
		db.execSQL("INSERT INTO "+D.table.DAY+" VALUES (7, "+Util.DayWeather.SUNNY+", 0, 0)");
	}
	
	/*id_day, id_task, start, finish*/
	public static void genTaskDayData (SQLiteDatabase db){
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 1, 6, 9)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 2, 6, 20)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 3, 8, 13)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 1, 11, 15)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 4, 6, 24)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 5, 6, 18)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 6, 6, 21)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 7, 6, 21)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 1, 18, 23)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (1, 8, 9, 24)");
		
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 1, 6, 9)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 14, 6, 12)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 10, 7, 12)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 1, 11, 13)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 11, 12, 15)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 9, 6, 18)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 13, 15, 21)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 1, 17, 21)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 19, 6, 24)");
		db.execSQL("INSERT INTO "+D.table.TASK_DAY+" VALUES (2, 8, 6, 24)");		
	}
	
	/*id_game, id_day*/
	public static void genGameData(SQLiteDatabase db){
		db.execSQL("INSERT INTO "+D.table.GAME+" VALUES (1, 1)");
		db.execSQL("INSERT INTO "+D.table.GAME+" VALUES (1, 2)");
		db.execSQL("INSERT INTO "+D.table.GAME+" VALUES (1, 3)");
		db.execSQL("INSERT INTO "+D.table.GAME+" VALUES (1, 4)");
		db.execSQL("INSERT INTO "+D.table.GAME+" VALUES (1, 5)");
		db.execSQL("INSERT INTO "+D.table.GAME+" VALUES (1, 6)");
		db.execSQL("INSERT INTO "+D.table.GAME+" VALUES (1, 7)");
	}
	
}

